<script type="text/javascript">
        $(document).ready(function(){
                var dtpkr = $("#dtpkr");
                var date = new Date();
                var wtf = '{wtf}';
                switch(wtf){
                        case 'planned':
                                dtpkr.datepicker({dateFormat: 'yy-mm-dd', firstDay: 1, onSelect: function(dateText, inst){
                                        upd(wtf, dateText);
                                }, minDate: new Date(date.getFullYear(), date.getMonth(), date.getDate())});
                                break;
                        case 'past':
                                dtpkr.datepicker({dateFormat: 'yy-mm-dd', firstDay: 1, onSelect: function(dateText, inst){
                                        upd(wtf, dateText);
                                }});
                                break;
                }
                dtpkr.find('.ui-datepicker').css('border', '0px');
		if(!$.browser.webkit) $('#calendar_head').css('height','65px'); // Fix
        });
</script>
<div id="calendar_head"></div>
<div id="dtpkr" style="direction: ltr; float: right;"></div>
<br />
